import Vue from 'vue'
import store from './store'
import Router from 'vue-router'
import Home from './views/Home.vue'

const TingShuo = () => import('./views/TingShuo.vue')
const WeiKe = () => import('./views/WeiKe.vue')
const YeTan = () => import('./views/YeTan.vue')
const Find = () => import('./views/Find.vue')
const ZhouQi = () => import('./views/ZhouQi.vue')
const Mine = () => import('./views/Mine.vue')

Vue.use(Router, store)

export default new Router({
  // mode: "history",
  mode: 'hash',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      component: Home,
      children: [
        {
          path: '',
          name: 'yeTan',
          component: YeTan
        },
        {
          path: 'weiKe',
          name: 'weiKe',
          component: WeiKe
        },
        {
          path: 'tingShuo',
          name: 'tingShuo',
          component: TingShuo
        }
      ]
    },
    {
      path: '/find',
      name: 'find',
      component: Find
    },
    {
      path: '/zhouQi',
      name: 'zhouQi',
      component: ZhouQi
    },
    {
      path: '/mine',
      name: 'mine',
      component: Mine
    }
  ]
})
